using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using WebDauGia.Domain.Models.Mapping;

namespace WebDauGia.Domain.Models
{
    public partial class WebDauGiaDBContext : DbContext
    {
        static WebDauGiaDBContext()
        {
            Database.SetInitializer<WebDauGiaDBContext>(null);
        }

        public WebDauGiaDBContext()
            : base("Name=WebDauGiaDBContext")
        {
        }

        public DbSet<ChiTietDonHang> ChiTietDonHangs { get; set; }
        public DbSet<ChiTietDonNhap> ChiTietDonNhaps { get; set; }
        public DbSet<ChucVu> ChucVus { get; set; }
        public DbSet<DanhMucSanPham> DanhMucSanPhams { get; set; }
        public DbSet<DanhSachDauGia> DanhSachDauGias { get; set; }
        public DbSet<DonDatHang> DonDatHangs { get; set; }
        public DbSet<DonNhapHang> DonNhapHangs { get; set; }
        public DbSet<HangSanXuat> HangSanXuats { get; set; }
        public DbSet<HinhAnh> HinhAnhs { get; set; }
        public DbSet<KhachHang> KhachHangs { get; set; }
        public DbSet<LoaiSanPham> LoaiSanPhams { get; set; }
        public DbSet<Menu> Menus { get; set; }
        public DbSet<NhanVien> NhanViens { get; set; }
        public DbSet<PhanQuyen> PhanQuyens { get; set; }
        public DbSet<PhuongThucGiaoHang> PhuongThucGiaoHangs { get; set; }
        public DbSet<PhuongThucThanhToan> PhuongThucThanhToans { get; set; }
        public DbSet<SanPham> SanPhams { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        public DbSet<TonKho> TonKhoes { get; set; }
        public DbSet<TrangThaiDonHang> TrangThaiDonHangs { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new ChiTietDonHangMap());
            modelBuilder.Configurations.Add(new ChiTietDonNhapMap());
            modelBuilder.Configurations.Add(new ChucVuMap());
            modelBuilder.Configurations.Add(new DanhMucSanPhamMap());
            modelBuilder.Configurations.Add(new DanhSachDauGiaMap());
            modelBuilder.Configurations.Add(new DonDatHangMap());
            modelBuilder.Configurations.Add(new DonNhapHangMap());
            modelBuilder.Configurations.Add(new HangSanXuatMap());
            modelBuilder.Configurations.Add(new HinhAnhMap());
            modelBuilder.Configurations.Add(new KhachHangMap());
            modelBuilder.Configurations.Add(new LoaiSanPhamMap());
            modelBuilder.Configurations.Add(new MenuMap());
            modelBuilder.Configurations.Add(new NhanVienMap());
            modelBuilder.Configurations.Add(new PhanQuyenMap());
            modelBuilder.Configurations.Add(new PhuongThucGiaoHangMap());
            modelBuilder.Configurations.Add(new PhuongThucThanhToanMap());
            modelBuilder.Configurations.Add(new SanPhamMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new TonKhoMap());
            modelBuilder.Configurations.Add(new TrangThaiDonHangMap());
        }
    }
}
